table of contents
SYSTEMD-SOCKET-ACTIVATE(1) | systemd-socket-activate | SYSTEMD-SOCKET-ACTIVATE(1) |
NAME¶
systemd-socket-activate - Test socket activation of daemons
SYNOPSIS¶
systemd-socket-activate [OPTIONS...] daemon [OPTIONS...]
DESCRIPTION¶
systemd-socket-activate may be used to launch a socket-activated service program from the command line for testing purposes. It may also be used to launch individual instances of the service program per connection.
The daemon to launch and its options should be specified after options intended for systemd-socket-activate.
If the --inetd option is given, the socket file descriptor will be used as the standard input and output of the launched process. Otherwise, standard input and output will be inherited, and sockets will be passed through file descriptors 3 and higher. Sockets passed through $LISTEN_FDS to systemd-socket-activate will be passed through to the daemon, in the original positions. Other sockets specified with --listen= will use consecutive descriptors. By default, systemd-socket-activate listens on a stream socket, use --datagram and --seqpacket to listen on datagram or sequential packet sockets instead (see below).
OPTIONS¶
-l address, --listen=address
-a, --accept
-d, --datagram
--seqpacket
--inetd
-E VAR[=VALUE], --setenv=VAR[=VALUE]
--fdname=NAME[:NAME...]
-h, --help
--version
ENVIRONMENT VARIABLES¶
$LISTEN_FDS, $LISTEN_PID, $LISTEN_FDNAMES
$SYSTEMD_LOG_TARGET, $SYSTEMD_LOG_LEVEL, $SYSTEMD_LOG_TIME, $SYSTEMD_LOG_COLOR, $SYSTEMD_LOG_LOCATION
EXAMPLES¶
Example 1. Run an echo server on port 2000
$ systemd-socket-activate -l 2000 --inetd -a cat
Example 2. Run a socket-activated instance of systemd-journal-gatewayd(8)
$ systemd-socket-activate -l 19531 /usr/lib/systemd/systemd-journal-gatewayd
SEE ALSO¶
systemd(1), systemd.socket(5), systemd.service(5), systemd-run(1), sd_listen_fds(3), sd_listen_fds_with_names(3), cat(1)
systemd 252 |